var htmlLayoutKit=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/us-jelly/",n(n.s=10)}([function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}t.exports=function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}},function(t,e){t.exports='<canvas class="canvas" height="600" width="600">Canvas не поддерживается. :-(</canvas>\n<svg class="svg" height="442" width="442" xmlns="http://www.w3.org/2000/svg">\n    <path d="M66,58H80c-0.06,17.255.062,36.319,1,52l6,5a64.746,64.746,0,0,0,13-1c1.457-2.368,4.111-4.138,5-7V58h14c0.254,15.933,3.445,50.418-3,60-2.492,3.7-6.759,4.849-11,7-3.66,1.856-12.058,4.939-19,3-8.2-2.292-15.91-6.655-19-14-1.876-4.458-1-12.051-1-18V58Z"/>\n    <path d="M219,57l22,1c3.327,1.073,7.016,3.1,11,4v2c-2.867,2.059-4.484,6.682-6,10a45.72,45.72,0,0,0-26-3c-1.732,3.039-2.855,3.832-3,9a155.664,155.664,0,0,0,17,8l11,3,1,2h2c2.63,1.886,3.683,5.766,6,8,0.422,4.826,1.951,9.557-1,13-1.251,5.584-4.565,7.534-9,10-15.136,8.415-31.324,1.465-44-4v-1c4.042-3.013,3.939-8.962,10-10,5.08,5.5,16.527,6.888,26,5,1.721-3.046,3.43-4.518,4-9l-10-6c-6.317-2.731-13.563-2.405-19-6-3.579-2.366-4.976-7.077-8-10-0.2-11.369,2.367-18.76,9-23C214.289,58.537,217.075,58.68,219,57Z"/>\n    <path d="M329,58h48V70H343V86h29V99H343v16h34v12H329V58Z"/>\n    <path d="M80,234v26H66V190c7.094-2.54,20.1-1.064,29-1,2,1.43,4.971.046,8,1a45.243,45.243,0,0,1,8,4c5.661,4.22,9.338,18.7,5,27-2.5,4.782-7.821,6.478-9,13,4.723,4.65,9.165,19.235,12,26H104c-2.094-5.078-9.532-26.086-14-27C88.158,234.482,83.377,234.1,80,234Zm0-13a176.553,176.553,0,0,0,20-1c2.53-4,4.069-4.556,4-12-1.566-1.373-2.132-2.808-4-4-3.435-3.014-14.908-2.089-20-3v20Z"/>\n    <path d="M220,189c13.687-.305,22.97,1.208,32,5l-6,12c-5.448-2.32-18.56-7.5-24-3-3,.826-3.13,1.047-4,4-1.028,1.262-.95,2.477-1,5,2.874,1.315,5.306,3.827,8,5,7.166,3.12,15.925,2.886,22,7,3.045,2.062,4.374,6.467,7,9,0.384,4.632,1.86,9.55-1,13-3.529,14.049-25.773,16.605-40,11-5.139-2.025-11.01-1.8-12-8,3.789-2.572,3.51-7.049,9-8,5.158,5.625,18.713,7.434,27,4a38.38,38.38,0,0,0,3-8l-10-6c-6.295-2.726-13.607-2.375-19-6-3.433-2.308-5.048-7.153-8-10-0.4-11.578,2.5-20.623,11-23C215.554,190.648,218.471,190.384,220,189Z"/>\n    <path d="M327,189h51v13H360v58H346V202H327V189Z"/>\n    <path d="M88,318c25.342-.562,31.949,11.1,32,36,0.013,6.361-.182,18.681-3,22-5.217,18.85-49.571,17.645-50-5-1.66-2.141-.172-5.642-1-9-0.977-3.962-1.544-21.976,0-27,0.84-2.733,3.828-8.361,6-10h2l2-3C79.783,319.9,84.785,320.55,88,318Zm2,13c-2.6,2.249-7.3,2.944-9,6-5.038,9.044-1.1,27.406,1,36,3.026,1.465,3.521,2.653,8,3,4.265,3.665,11.981-1.536,13-5,3.359-3.171,4.449-26.766,2-33a9.287,9.287,0,0,0-6-5C96.956,331.112,94.068,330.968,90,331Z"/>\n    <path d="M201,319c13.2-.173,34.6-2.624,43,3,3.744,2.506,4.824,7.913,8,11,0.226,7.692,1.565,13.276-2,19-2.529,4.061-6.972,5.245-8,11,2.673,2.6,10.4,21.039,11,26H238c-1.206-7.114-5.422-13.158-8-19-1.1-2.5-.822-6.845-3-8h-6c-1.262,1.028-2.477.95-5,1-0.415,7.592-.982,17.021-1,26H201V319Zm14,12v20c10.043,0.186,15.1-1.309,22-3,0.953-3.529,1.988-5.53,2-11-1.9-1.263-1.592-2.055-4-3C231.365,330.251,222.43,330.863,215,331Z"/>\n    <path d="M360,389H346q-0.5-14.5-1-29c-4.743-13.411-16.448-27.1-20-41h15c0.908,4.413,10.473,26.321,13,29v-1l13-28h15v1c-4.5,4.392-5.938,12.182-9,18-4.107,7.8-9.442,15.7-12,25v26Z"/>\n</svg>'},function(t,e,n){var i=n(6),r=n(7),o=n(8),s=n(9);t.exports=function(t){return i(t)||r(t)||o(t)||s()}},function(t,e,n){var i=n(3);t.exports=function(t){if(Array.isArray(t))return i(t)}},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e,n){var i=n(3);t.exports=function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,n){"use strict";n.r(e);var i=n(1),r=n.n(i),o=n(2),s=n.n(o),a=n(4),c=n.n(a),h=n(0),u=n.n(h),v=n(5),l=n.n(v),f=function(){function t(e){r()(this,t),this.init(e)}return s()(t,[{key:"init",value:function(t){var e=t.friction,n=void 0===e?.1:e,i=t.r,r=void 0===i?2:i,o=t.tension,s=void 0===o?.9:o,a=t.x,c=void 0===a?0:a,h=t.y,u=void 0===h?0:h;this.friction=n,this.r=r,this.ox=c,this.oy=u,this.x=c,this.y=u,this.vx=0,this.vy=0,this.tension=s}},{key:"proccess",value:function(t,e){this.time=+new Date,this.react(t,e),this.prepare(),this.pos()}},{key:"react",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.x-t.x,i=this.y-t.y,r=Math.sqrt(n*n+i*i),o=t.r+this.r;if(r<o){var s=Math.atan2(i,n);this.vx+=t.x+Math.cos(s)*o-this.x,this.vy+=t.y+Math.sin(s)*o-this.y}var a=Math.round(this.time/600+e/6);this.vx+=2*Math.cos(a),this.vy+=2*Math.sin(a)}},{key:"prepare",value:function(){var t=this.x-this.ox,e=this.y-this.oy;this.vx-=t*this.tension,this.vy-=e*this.tension,this.vx*=this.friction,this.vy*=this.friction}},{key:"pos",value:function(){this.x+=this.vx,this.y+=this.vy}},{key:"render",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#ff4444";t.save(),t.beginPath(),t.arc(this.x,this.y,this.r,0,2*Math.PI),t.fillStyle=e,t.fill(),t.closePath(),t.restore()}}]),t}(),d=function(){function t(e){var n=this;r()(this,t),u()(this,"handleMove",(function(t){t.preventDefault();var e=t.clientX||t.targetTouches[0].clientX,i=t.clientY||t.targetTouches[0].clientY;n.x=e-n.rect.left,n.y=i-n.rect.top})),this.canvas=e,this.rect=this.canvas.getBoundingClientRect(),this.x=0,this.y=0,this.bind()}return s()(t,[{key:"bind",value:function(){this.canvas.removeEventListener("mousemove",this.handleMove),this.canvas.addEventListener("mousemove",this.handleMove),this.canvas.removeEventListener("touchmove",this.handleMove),this.canvas.addEventListener("touchmove",this.handleMove)}}]),t}();function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){u()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var g=function(){function t(e,n){var i=this;r()(this,t),u()(this,"render",(function(){i.requestId=window.requestAnimationFrame(i.render),i.ctx.clearRect(0,0,i.rect.width,i.rect.height),i.ctx.fillStyle="#000000",i.ctx.fillRect(0,0,i.rect.width,i.rect.height),i.pathList.map(i.renderObject)})),u()(this,"objectInit",(function(t){return t.map(i.dotInit)})),u()(this,"dotInit",(function(t){return new f(p(p({},t),{},{r:5}))})),u()(this,"dotDraw",(function(t){t.proccess({r:100,x:i.mouse.x,y:i.mouse.y}),t.render(i.ctx)})),u()(this,"lineDraw",(function(t,e){if(i.dot1){t.proccess({r:100,x:i.mouse.x,y:i.mouse.y},e);var n=.5*(i.dot1.x+t.x),r=.5*(i.dot1.y+t.y);i.ctx.quadraticCurveTo(i.dot1.x,i.dot1.y,n,r)}i.dot1=t})),u()(this,"renderObject",(function(t){i.ctx.beginPath(),i.dot1=t[t.length-1],t.forEach(i.lineDraw),i.ctx.closePath(),i.ctx.fillStyle="#ffffff",i.ctx.fill()})),u()(this,"getPoints",(function(t){return function(e){var n=e.getTotalLength()/t;return Array(t).fill(0).map((function(t,r){var o=e.getPointAtLength(r*n);return{x:o.x/i.svgSize.width*i.rect.width,y:o.y/i.svgSize.height*i.rect.height}}))}})),this.init(e,n),this.render()}return s()(t,[{key:"setSize",value:function(t,e){this.canvas.width=t,this.canvas.height=e,this.init(this.canvas,this.svg)}},{key:"renderMouse",value:function(){new f({r:100,x:this.mouse.x,y:this.mouse.y}).render(this.ctx,"#44cc44")}},{key:"renderImage",value:function(t){this.image=new Image,this.image.src=t,this.ctx.drawImage(this.image,0,0,this.rect.width,this.rect.height)}},{key:"init",value:function(t,e){this.svg=e,this.svgSize={height:e.height.baseVal.value,width:e.width.baseVal.value},this.canvas=t,this.rect=this.canvas.getBoundingClientRect();var n=l()(e.querySelectorAll("path")).map(this.getPoints(100));this.ctx=this.canvas.getContext("2d"),this.mouse=new d(this.canvas),this.pathList=n.map(this.objectInit)}},{key:"destroy",value:function(){window.cancelAnimationFrame(this.requestId)}}]),t}(),m=function(){function t(e){var n=this;r()(this,t),u()(this,"handleResize",(function(t){var e=t.target.innerHeight,i=t.target.innerWidth,r=Math.min(e,i);n.canvas.setSize(r,r)})),this.root=e,this.init(),this.bind()}return s()(t,[{key:"init",value:function(){var t=this.root.querySelector(".canvas"),e=this.root.querySelector(".svg");this.canvas=new g(t,e)}},{key:"bind",value:function(){window.removeEventListener("resize",this.handleResize),window.addEventListener("resize",this.handleResize),window.dispatchEvent(new Event("resize"))}},{key:"destroy",value:function(){this.canvas.destroy()}}]),t}(),b=function(){function t(e){r()(this,t),e.innerHTML=c.a,this.jelly=new m(e)}return s()(t,[{key:"destroy",value:function(){this.jelly.destroy()}}]),t}(),x=document.body;x&&new b(x),"serviceWorker"in navigator&&window.addEventListener("load",(function(){navigator.serviceWorker.register("/us-jelly/sw.js").catch((function(t){console.error("SW registration failed: ",t)}))}))}]);